package com.ruoyi.novel.service.impl;

import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.novel.domain.NovelDTO;
import com.ruoyi.novel.domain.NovelVo;
import com.ruoyi.novel.mapper.AllBookMapper;
import com.ruoyi.novel.service.AllBookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AllBookServiceImpl implements AllBookService {
    @Autowired
    private AllBookMapper allBookMapper;
    private NovelVo novelVo;

    @Override
    public List<NovelDTO> selectAllBookList(NovelVo novelVo) {
        this.novelVo = novelVo;
        List<NovelDTO> novelDTOS = allBookMapper.selectAllBookList(novelVo);
        return novelDTOS;
    }

    @Override
    public List<NovelDTO> selectNovelByAuthorOrName(String authNameOrNovelName) {
        return allBookMapper.selectNovelByAuthorOrName(authNameOrNovelName);
    }
}
